# coding:utf8
'html downloader'

import urllib.request as request

class HtmlDownloader(object):
    def download(self,url):
        print('download url is ',url)
        if url is None:
            print('url is invalid !! ')
            return None

        response = request.urlopen(url)
        print('response code is ',response.getcode())

        if response.getcode() != 200:
            print('response is not 200 !! ')
            return None

        return response.read()